# -*- coding: utf-8 -*-
"""
Based on Feedjack urls.py by Gustavo Picón
urls.py
"""

from django.conf.urls.defaults import patterns, url

urlpatterns = patterns('feedjack_extension.views',
    url(r'^subscribers/(?P<subscriber_id>\d+)/tags/(?P<tag>.*)/$', "subscriber_show", name="by_tag_subscriber_show"),
    url(r'^subscribers/(?P<subscriber_id>\d+)/$', "subscriber_show", name="subscriber_show"),
    url(r'^subscribers/$', "subscribers_list", name="subscribers_list"),

    url(r'^feeds/(?P<feed_id>\d+)/tags/(?P<tag>.*)/$', "feed_show", name="by_tag_feed_show"),
    url(r'^feeds/(?P<feed_id>\d+)/$', "feed_show", name="feed_show"),
    url(r'^feeds/$', "feeds_list", name="feeds_list"),
    
    url(r'^tags/(?P<tag>.*)/feeds/$', "tag_feeds_list", name="tag_feeds_list"),
    url(r'^tags/(?P<tag>.*)/subscribers/$', "tag_subscribers_list", name="tag_subscribers_list"),
    url(r'^tags/(?P<tag>.*)/$', "tag_show", name="tag_show"),
    url(r'^tags/$', "tags_cloud", name="tags_cloud"),
    
    url(r'^opml/$', "opml", name="opml"),
    url(r'^foaf/$', "foaf", name="foaf"),
    
    url(r'^posts/(?P<post_id>\d+)/$', "post_show", name="post_show"),
    url(r'^posts/$', "posts_list", name="posts_list"),
    
    url(r'^search/$', "search", name="search"),
)

urlpatterns += patterns('feedjack_extension.feeds',
    url(r'^posts/rss20.xml$', "rss_feed", name="default_feed"),
    url(r'^posts/feeds/rss/$', "rss_feed", name="rss_feed"),
    url(r'^feeds/rss/tags/(?P<tag>.*)/$', "rss_feed", name="tag_rss_feed"),
    url(r'^feeds/rss/subscribers/(?P<subscriber_id>\d+)/$', "rss_feed", name="subscriber_rss_feed"),
    url(r'^feeds/rss/subscribers/(?P<subscriber_id>\d+)/tags/(?P<tag>.*)/$', "rss_feed", name="tag_subscriber_rss_feed"),
)

#url(r'^posts/feed/$', "atom_feed", name="atom_feed"),
#url(r'^posts/feed/$', "atom_feed", name="default_feed"),
#url(r'^posts/feeds/atom/$', "atom_feed", name="atom_feed"),
#url(r'^feeds/tags/(?P<tag>.*)/$', "atom_feed", name="tag_feed"),
#url(r'^feeds/atom/tags/(?P<tag>.*)/$', "atom_feed", name="tag_atom_feed"),
#url(r'^feeds/subscribers/(?P<subscriber_id>\d+)/$', "atom_feed", name="subscriber_feed"),
#url(r'^feeds/atom/subscribers/(?P<subscriber_id>\d+)/$', "atom_feed", name="subscriber_atom_feed"),
#url(r'^feeds/subscribers/(?P<subscriber_id>\d+)/tag/(?P<tag>.*)/$', "atom_feed", name="subscriber_tag_feed"),
#url(r'^feeds/atom/subscribers/(?P<subscriber_id>\d+)/tag/(?P<tag>.*)/$', "atom_feed", name="tag_subscriber_atom_feed"),
